package org.xx.armory.commons;

/**
 * 元组，最多包含10个元素。
 *
 * @param <T0>
 *         第①个元素的类型。
 * @param <T1>
 *         第②个元素的类型。
 * @param <T2>
 *         第③个元素的类型。
 * @param <T3>
 *         第④个元素的类型。
 * @param <T4>
 *         第⑤个元素的类型。
 * @param <T5>
 *         第⑥个元素的类型。
 * @param <T6>
 *         第⑦个元素的类型。
 * @param <T7>
 *         第⑧个元素的类型。
 * @param <T8>
 *         第⑨个元素的类型。
 * @param <T9>
 *         第⑩个元素的类型。
 */
public record Tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>(T0 t0, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7,
                                                            T8 t8, T9 t9) {
    private static final Void VOID = null;

    public static <T0_, T1_> Tuple<T0_, T1_, Void, Void, Void, Void, Void, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1
    ) {
        return makeTuple(t0, t1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_> Tuple<T0_, T1_, T2_, Void, Void, Void, Void, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2
    ) {
        return makeTuple(t0, t1, t2, VOID, VOID, VOID, VOID, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_> Tuple<T0_, T1_, T2_, T3_, Void, Void, Void, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3
    ) {
        return makeTuple(t0, t1, t2, t3, VOID, VOID, VOID, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_> Tuple<T0_, T1_, T2_, T3_, T4_, Void, Void, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4
    ) {
        return makeTuple(t0, t1, t2, t3, t4, VOID, VOID, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_, T5_> Tuple<T0_, T1_, T2_, T3_, T4_, T5_, Void, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4,
            T5_ t5
    ) {
        return makeTuple(t0, t1, t2, t3, t4, t5, VOID, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_, T5_, T6_> Tuple<T0_, T1_, T2_, T3_, T4_, T5_, T6_, Void, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4,
            T5_ t5,
            T6_ t6
    ) {
        return makeTuple(t0, t1, t2, t3, t4, t5, t6, VOID, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_> Tuple<T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_, Void, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4,
            T5_ t5,
            T6_ t6,
            T7_ t7
    ) {
        return makeTuple(t0, t1, t2, t3, t4, t5, t6, t7, VOID, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_> Tuple<T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, Void> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4,
            T5_ t5,
            T6_ t6,
            T7_ t7,
            T8_ t8
    ) {
        return makeTuple(t0, t1, t2, t3, t4, t5, t6, t7, t8, VOID);
    }

    public static <T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, T9_> Tuple<T0_, T1_, T2_, T3_, T4_, T5_, T6_, T7_, T8_, T9_> makeTuple(
            T0_ t0,
            T1_ t1,
            T2_ t2,
            T3_ t3,
            T4_ t4,
            T5_ t5,
            T6_ t6,
            T7_ t7,
            T8_ t8,
            T9_ t9
    ) {
        return new Tuple<>(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9);
    }
}
